package com.tedu.interceptor.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UserController {
    @PostMapping("/reg")
    public String reg(){
        System.out.println("UserController.reg()方法执行了");
        return "注册成功";
    }

    @PostMapping("/login")
    public String login(){
        System.out.println("UserController.login()方法执行了...");
        return "登录成功";
    }

    @GetMapping("/logout")
    public String logout(){
        System.out.println("UserController.logout()方法执行了...");
        return "注销成功";
    }

    @PostMapping("/findById")
    public String findById(){
        System.out.println("UserController.findById()方法执行了...");
        return "查询成功";
    }

    @PostMapping("/update")
    public String update(){
        System.out.println("UserController.update()方法执行了...");
        return "更新成功";
    }
}
